﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using PokerServerWebService.BusinessEntities;

namespace PokerServerWebService.DataAccess
{
    /// <summary>
    /// Construct a CASINO_USER_MONEY object from a datareader.
    /// </summary>
    internal class GetPlayerMoneyFactory : IDomainObjectFactory<CASINO_USER_MONEY>
    {
        public CASINO_USER_MONEY Construct(IDataReader reader)
        {
			CASINO_USER_MONEY cASINO_USER_MONEY = new CASINO_USER_MONEY();
			
			int user_MoneyIndex = reader.GetOrdinal("User_Money"); 
            if(!reader.IsDBNull(user_MoneyIndex))
            {
				cASINO_USER_MONEY.User_Money= reader.GetInt32(user_MoneyIndex);

			}

           
			return cASINO_USER_MONEY; 
        }
    }
}

